<?php include("src/editarCrecibidaExterna_cs.php");
@session_start();
$_SESSION['varMenu'] = 'Registrar'; 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Editar Registro</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="includes/calendario/calendar-system.css" title="system" />
<script type="text/javascript" src="includes/calendario/calendar.js"></script>
<script type="text/javascript" src="includes/calendario/lang/calendar-es.js"></script>
<script type="text/javascript" src="includes/calendario/calendar-setup.js"></script>
</head>
<body class="style" onload="MM_preloadImages('images/menu3.png','images/menu2.png','images/assignr.png','images/new_taskr.png','images/mailr.png','images/edit_2r.png','images/client_3r.png','images/deleter.png','images/backr.png','images/noter (1).png')">
<div id="container">
  <?php include('header.php');?>
  <div id="mainContent">  
    <?php include('menuTop.php');?>
    <div id="bg">
	 <form name="form" id="form" method="post" action="" enctype="multipart/form-data">
    <input type="hidden" name="edit" id="edit" value="1"/>
	 <input type="hidden" name="crecibidaCode" id="crecibidaCode" value="<?php echo $crecibidaCode;?>"/>
     <input type="hidden" name="crecibida_rename" id="crecibida_rename" value="<?php echo @$dataRecibidaExterna->cre_doc_rename;?>"/>
	 <table width="100%" border="0" cellspacing="0" cellpadding="4">
        
        <tr>
          <td><H1>Editar Correspondencia Recibida Externamente</H1></td>
        </tr>
        <tr>
          <td align="center"><table width="80%" border="0" cellpadding="8" cellspacing="0" bgcolor="#FFFFFF">
            <tr>
              <td colspan="2" align="center" valign="top" bgcolor="#400000">&nbsp;</td>
            </tr>
            <tr>
              <td width="75%" align="center" valign="top">
              <table width="80%" border="0" cellspacing="0" cellpadding="4">
                  <tr>
                    <td width="30%" align="left"><strong>
                      <h2>FECHA RECEPCIÓN:</h2>
                    </strong></td>
                    <td width="70%" align="left"><input name="fecha" type="text" style="width:100px" readonly="readonly" id="fecha" maxlength="45" class="form_select" value="<?php echo @$dataRecibidaExterna->cre_fecha;?>"/>
	<img src="images/mostrar_calendario.png" align="absmiddle" width="18" height="16" id="f_trigger_a11"/>
	<script type="text/javascript">
					Calendar.setup({
					inputField : "fecha",							
					ifFormat : "%d/%m/%Y",
					showsTime : false,
					button : "f_trigger_a11", 
					step : 1
					});
	</script></td>
                  </tr>
                </table>
				 <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left"><strong>
                        <h2>HORA RECEPCIÓN:</h2>
                      </strong></td>
                      <td width="70%" align="left"><select name="hora_inicio" id="hora_inicio">	
						<?php
                        for($i=0;$i<24;$i++)
                        {
                           if($i<10 && $auxInicio[0]==$i)
			                 echo '<option value="0'.$i.'" selected="selected" >0'.$i.'</option>';		
		                   elseif($auxInicio[0]==$i)
			                 echo '<option value="'.$i.'" selected="selected" >'.$i.'</option>';
                        }
                        
                        ?>
                        </select>
                        <select name="minutos_inicio" id="minutos_inicio">
                        <?php
                        for($i=0;$i<60;$i+=5)
                        {
                            if($i<10 && $auxInicio[1]==$i)
			                   echo '<option value="0'.$i.'" selected="selected">0'.$i.'</option>';		
		                    elseif($auxInicio[1]==$i)
			                  echo '<option value="'.$i.'" selected="selected">'.$i.'</option>';
                        }
                        
                        ?>
                        </select></td>
                    </tr>
                  </table>
                  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left"><strong>
                        <h2>NUMERO DE RADICADO: </h2>
                      </strong></td>
                      <td width="70%" align="left"><?php echo @$dataRecibidaExterna->cre_radicado;?></td>
                    </tr>
                  </table>
                   <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left"><strong>
                        <h2>ALARMA COMUNICACION: </h2>
                      </strong></td>
                      <td width="70%" align="left"><input type="text" name="alarma" id="alarma" value="<?php echo @$dataRecibidaExterna->cre_alarma;?>"/></td>
                    </tr>
                  </table>
                  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left"><strong>
                        <h2>REMITENTE: </h2>
                      </strong></td>
                      <td width="70%" align="left"><input type="text" name="remitente" id="remitente" value="<?php echo @$dataRecibidaExterna->cre_remitente;?>"/></td>
                    </tr>
                  </table>
                  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left"><strong>
                        <h2>OFICINA DE RECEPCIÓN: </h2>
                      </strong></td>
                      <td width="70%" align="left"><select name="oficina" id="oficina"><?php echo $cadenaDependencia;?></select></td>
                    </tr>
                  </table>
                   
                  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                  <tr>
                    <td width="30%" align="left"><strong>
                      <h2>FECHA DOCUMENTO:</h2>
                    </strong></td>
                    <td width="70%" align="left">
                    <input name="fechaDoc" type="text" style="width:100px" readonly="readonly" id="fechaDoc" maxlength="45" class="form_select" value="<?php echo @$dataRecibidaExterna->cre_fecha_doc;?>"/>
                        <img src="images/mostrar_calendario.png" align="absmiddle" width="18" height="16" id="f_trigger_a12"/>
                        <script type="text/javascript">
                                        Calendar.setup({
                                        inputField : "fechaDoc",							
                                        ifFormat : "%d/%m/%Y",
                                        showsTime : false,
                                        button : "f_trigger_a12", 
                                        step : 1
                                        });
                        </script></td>
                  </tr>
                </table>
                <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left" valign="top"><strong>
                        <h2>ANEXOS: </h2>
                      </strong></td>
                      <td width="70%" align="left"><textarea name="anexo"><?php echo @$dataRecibidaExterna->cre_anexos;?></textarea></td>
                    </tr>
                  </table>
                  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left"><strong>
                        <h2>SERIE - SUBSERIE: </h2>
                      </strong></td>
                      <td width="70%" align="left"><input type="text" name="subserie" id="subserie" value="<?php echo @$dataRecibidaExterna->cre_serie;?>"/></td>
                    </tr>
                  </table>
                   <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left"><strong>
                        <h2>DOCUMENTO ACTUAL :</h2>
                      </strong></td>
                      <td width="70%" align="left"> <a href="file_upload/documentos/<?php echo @$dataRecibidaExterna->cre_doc_rename;?>" target="_blank" style="text-decoration:none;"
						 title="<?php echo @$dataRecibidaExterna->cre_doc_original;?>">								
						<img src="images/icono_pdf.gif" alt="Ver" width="22" height="23" border="0" /></a></td>
                    </tr>
                  </table>
                  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left"><strong>
                        <h2>DOCUMENTO NUEVO :</h2>
                      </strong></td>
                      <td width="70%" align="left"><input type="file" name="archivo" id="archivo" />&nbsp;</td>
                    </tr>
                  </table>
				  <table width="80%" border="0" cellspacing="0" cellpadding="4">
                    <tr>
                      <td width="30%" align="left" valign="top">&nbsp;</td>
                      <td width="70%" align="left" valign="top">&nbsp;</td>
                    </tr>
					<tr>
					<td colspan="3" align="center"><input type="button" value="Editar"  onclick="javascript: return validate();"/>
					<input type="reset" value="Limpiar"/>	
					<input onClick="javascript:window.location.href='crecibidaExterna.php';" type="button" value="Cancelar" /></td> </tr>
                </table></td>
             
            </tr>
            <tr>
              <td colspan="2" align="center" valign="top" bgcolor="#400000"><br /></td>
            </tr>
          </table>
          <br />            <br /></td>
        </tr>
      </table>
	  </form>
    </div>
    <br />
    <br />
    <!-- end #mainContent -->
  </div>
  <?php include('footer.php');?>
<!-- end #container --></div>

</body>
</html>
<script language="javascript" type="text/javascript">
 
function validate()
{
	f = window.document.form;
  
	var msg = '';
	
	/* var name 		= document.getElementById('name').value;
	var emision_day = document.getElementById('emision_day').value;
	
		
	if(name == '')
		msg = 'Debes introducir un Nombre del Programa para continuar\n';
	
		
	if(emision_day == '')
		msg = msg+'Debes seleccionar un dia de emisión para continuar\n';
	*/
	
		
	if(msg != '')
	{
		alert(msg);
		return false;
	}
	else
	{
		f.submit();		
		return true;
	}
		
}
</script>